﻿@model IEnumerable<MvcFlaschi.Models.Flaschi>

@{
    ViewBag.Title = "Index";
}

<p>
    @*@Html.ActionLink("Neuer Eintrag", "Create")*@
    <a href="@Url.Action("Create")" title="Anlegen">
        <span class="glyphicon glyphicon-plus"></span>
    </a>
</p>
<table id="Home-Log-Table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.FlaschiMenge)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FlaschiDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FlaschiTime)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.FlaschiMenge)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FlaschiDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FlaschiTime)
            </td>
            <td>
                <a href="@Url.Action("Edit", new { id = item.FlaschiId })" title="Bearbeiten">
                    <span class="glyphicon glyphicon-pencil"></span>
                </a>|
                @*                <a href="@Url.Action("Details", new { id = item.FlaschiId })" title="">
                    <span class="glyphicon glyphicon-eye-open"></span>
                </a>|*@
                @*                <a href="@Url.Action("Delete", new { id = item.FlaschiId })" title="Löschen">
                    <span class="glyphicon glyphicon-trash"></span>
                </a>*@
                <a id="delete-flaschi-item" href="#" title="Löschen">
                    <span class="glyphicon glyphicon-trash"></span>
                    <span class="hidden fid">@item.FlaschiId</span>
                    <span class="hidden furl">@Url.Action("Remove", new { id = item.FlaschiId })</span>
                </a>
            </td>
        </tr>
    }

</table>

 <!-- Modal -->
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">Eintrag löschen?</h4>
        </div>
        <div class="modal-body">
          Diesen Eintrag wirklich löschen?
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
          <button id="delete-flaschi-item-confirmed" type="button" class="btn btn-primary">Löschen</button>
        </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->

@section Scripts {
    <script src="~/Scripts/index.js"></script>
}